package utils

import "fmt"

func FormTime(second int) string {
	h := second / 3600
	var m int
	if h > 0 {
		m = (second - h*3600) / 60
	} else {
		m = second / 60
	}
	s := second % 60
	if h > 0 {
		return fmt.Sprintf("%v:%v:%v", h, m, s)
	}
	return fmt.Sprintf("%v:%v", m, s)
}
